<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>购物系统-管理页面</title>
    <link th:href="@{/webjars/bootstrap/5.1.3/css/bootstrap.css}" rel="stylesheet">
    <link th:href="@{/css/ms-common.css}" rel="stylesheet">
    <link th:href="@{/css/plugins/imgUpload.css}" rel="stylesheet">
    <link th:href="@{/css/common/sidebar.css}" rel="stylesheet">
    <link th:href="@{/css/common/ms-common.css}" rel="stylesheet">
</head>
<body style="overflow-x:hidden;">
    <div th:replace="common/topbar::flag(type='admin')"></div>
    <div th:replace="common/sidebar::sidebar(sidebarType='admin')"></div>
    <div th:replace="common/ms-toast"></div>

    <!-- 仪表盘页面 -->
    <div th:if="${type == 'dashboard'}" class="row offset-md-2">
        <div th:replace="admin/card/dashbord"></div>
    </div>
    <!--用户信息管理页面-->
    <div th:if="${type == 'user'}" class="row offset-md-2">
        <div th:replace="admin/card/user-list"></div>
    </div>
    <!--用户角色管理页面-->
    <div th:if="${type == 'user_role'}" class="row offset-md-2">
        <div th:replace="admin/card/user-role"></div>
    </div>

    <!--供应商管理页面-->
    <div th:if="${type == 'provider'}" class="row offset-md-2">
        <div th:replace="admin/card/provider-list"></div>
    </div>

    <!--商品管理页面-->
    <div th:if="${type == 'product'}" class="row offset-md-2">
        <div th:replace="admin/card/product-list"></div>
    </div>

    <!--商品管理页面-->
    <div th:if="${type == 'order'}" class="row offset-md-2">
        <div th:replace="admin/card/order-list"></div>
    </div>

    <!--角色权限管理页面-->
    <div th:if="${type == 'rolePerm'}" class="row offset-md-2">
        <div th:replace="admin/card/role-perm"></div>
    </div>

    <!--权限管理页面-->
    <div th:if="${type == 'perm'}" class="row offset-md-2">
        <div th:replace="admin/card/perm"></div>
    </div>
</body>
<script type="text/javascript" th:src="@{/webjars/jquery/3.3.1/jquery.js}"></script>
<script type="text/javascript" th:src="@{/webjars/bootstrap/5.1.3/js/bootstrap.bundle.js}"></script>
<script type="text/javascript" th:src="@{/js/common/ms-config.js}"></script>
<script type="text/javascript" th:src="@{/js/common/ms-common.js}"></script>
<script type="text/javascript" th:src="@{/js/common/ms-btn.js}"></script>
<script type="text/javascript" th:src="@{/js/utils/ms-util-param.js}"></script>
<script type="text/javascript" th:src="@{/js/utils/ms-util-address.js}"></script>
<script type="text/javascript" th:src="@{/js/utils/ms-util-ajax.js}"></script>
<script type="text/javascript" th:src="@{/js/common/ms-topbar.js}"></script>
<script type="text/javascript" th:src="@{/js/common/ms-toast.js}"></script>


<!--仪表盘页面需要的JS-->
<th:block th:if="${type == null || type == 'dashboard'}">
    <script type="text/javascript" th:src="@{/webjars/echarts/5.0.2/echarts.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/china.js}"></script>
    <script type="text/javascript" th:src="@{/js/admin/card/dashboard.js}"></script>
</th:block>
<!-- 用户页面需要的JS -->
<th:block th:if="${type == null || type == 'user'}">
    <script th:src="@{/js/plugins/imgUpload/plugin-imageCropper.js}" type="text/javascript"></script>
    <script th:src="@{/js/plugins/imgUpload/plugin-imgUpload.js}" type="text/javascript"></script>
    <script th:src="@{/js/admin/card/user-list.js}" type="text/javascript" ></script>
</th:block>
<!--用户角色页面需要的JS-->
<th:block th:if="${type == null || type == 'user_role'}">
    <script type="text/javascript" th:src="@{/js/admin/card/user-role.js}"></script>
</th:block>
<!--供应商管理页面需要的JS-->
<th:block th:if="${type == null || type == 'provider'}">
    <script type="text/javascript" th:src="@{/js/admin/card/provider-list.js}"></script>
</th:block>
<!--商品管理页面需要的JS-->
<th:block th:if="${type == null || type == 'product'}">
    <script th:src="@{/js/plugins/imgUpload/plugin-imageCropper.js}" type="text/javascript"></script>
    <script th:src="@{/js/plugins/imgUpload/plugin-imgUpload.js}" type="text/javascript"></script>
    <script type="text/javascript" th:src="@{/js/admin/card/product-list.js}"></script>
</th:block>
<!-- 订单管理页面需要的JS-->
<th:block th:if="${type == null || type == 'order'}">
    <script type="text/javascript" th:src="@{/js/admin/card/order-list.js}"></script>
</th:block>
<!-- 角色权限页面需要的JS-->
<th:block th:if="${type == null || type == 'rolePerm'}">
    <script type="text/javascript" th:src="@{/js/admin/card/role-perm.js}"></script>
</th:block>
<!-- 权限页面需要的JS-->
<th:block th:if="${type == null || type == 'perm'}">
    <script type="text/javascript" th:src="@{/js/admin/card/perm.js}"></script>
</th:block>
</html>